<?php

namespace app\admin\validate\group;

use think\Validate;

class GroupGoodsVal extends Validate
{
    protected $rule=array(
        "id"=>"require",
        "title"=>"require",
        "goods_id"=>"require",
        "type"=>"require",
        "img"=>"require",
        "status"=>"require",
        "price"=>"require",
        "content"=>"require",
        "complete_num"=>"require",
        "start_time"=>"require",
        "end_time"=>"require",
    );
    protected $message=array(
        "id|require"=>"id为空",
        "title|require"=>"标题不能为空",
        "goods_id|require"=>"请选择音乐",
        "type|require"=>"请选择音乐种类",
        "img|require"=>"请上传图片",
        "status|require"=>"请选择是否展示",
        "price|require"=>"请输入金额",
        "content|require"=>"请输入内容",
        "complete_num|require"=>"请输入拼团成功人数",
        "start_time|require"=>"请选择开始时间",
        "end_time|require"=>"请选择结束时间",
    );
    protected $scene=array(
        "create"=>array("title","goods_id","type","img","status","price","content","complete_num","start_time","end_time"),
        "update"=>array("id","title","goods_id","type","img","status","price","content","complete_num","start_time","end_time"),
    );
}